function CheckRegister()
{
	var username = document.getElementById("Username").value;
	var password = document.getElementById("Password").value;
	var email = document.getElementById("Email").value;
	var phone = document.getElementById("Phone").value;
	var address = document.getElementById("Address").value;
	var validphone = /^[0-9]*$/;
	var validemail =  /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
	var validpassword = /^[0-9a-zA-Z!$#%]{4,20}$/;
	if(username == "" )
	{
		window.alert("Username is not allowed to be null!");
		document.getElementById("Username").focus();
		document.getElementById("Username").select();
		return false;
	}
	else if(password == "" || !validpassword.test(password))
	{
		if(password == "")
		{
			window.alert("Password is not allowed to be null!");
		}
		else
		{
			window.alert("Password must contain at least 4 characters, no longer than 20!");
		}
		document.getElementById("Password").focus();
		document.getElementById("Password").select();
		return false;
	}
	else if(email == "" || !validemail.test(email))
	{ 
		if(email == "")
		{
			window.alert("Email is not allowed to be null!");
		}
		else
		{
			window.alert("Please input the correct email!");
		}
		document.getElementById("Email").focus();
		document.getElementById("Email").select();
		return false;
	}
	else if(phone=="" || !validphone.test(phone))
	{
		if(phone == "")
		{
			window.alert("Phone is not allowed to be null!");
		}
		else
		{
			window.alert("Please input the correct number for the phone!");
		}
		document.getElementById("Phone").focus();
		document.getElementById("Phone").select();
		return false;
	}
	else if(address == "")
	{
		window.alert("Address is not allowed to be null!");
		document.getElementById("Address").focus();
		document.getElementById("Address").select();
		return false;
	}
	
}